##Gray and Jenkins - PoP 2024##

##Load State-Level Data File##

##Table 1##

xtset state

xtreg turnout poll_tax i.lit_test i.women_vote i.aussie_ballot i.exfelon lynchings i.elec_type i.year if year>1869 & year<1971, fe vce(cl state)

xtreg turnout poll_tax i.lit_test##i.south i.women_vote##i.south i.aussie_ballot##i.south i.exfelon##i.south c.lynchings##i.south i.elec_type i.year if year>1869 & year<1971, fe vce(cl state)

xtreg gopresult poll_tax i.lit_test i.women_vote i.aussie_ballot i.exfelon lynchings i.elec_type i.year if year>1869 & year<1971, fe vce(cl state)

xtreg gopresult poll_tax i.lit_test##i.south i.women_vote##i.south i.aussie_ballot##i.south i.exfelon##i.south c.lynchings##i.south i.elec_type i.year if year>1869 & year<1971, fe vce(cl state)


##Table 2##
quietly xtreg turnout poll_tax i.lit_test##i.south i.women_vote##i.south i.aussie_ballot##i.south i.exfelon##i.south c.lynchings##i.south i.elec_type i.year if year>1869 & year<1971, fe vce(cl state)

lincom 1.lit_test + 1.south#1.lit_test
lincom 1.aussie_ballot + 1.south#1.aussie_ballot
lincom 1.exfelon + 1.south#1.exfelon

##Table 3##
quietly xtreg gopresult poll_tax i.lit_test##i.south i.women_vote##i.south i.aussie_ballot##i.south i.exfelon##i.south c.lynchings##i.south i.elec_type i.year if year>1869 & year<1971, fe vce(cl state)

lincom 1.lit_test + 1.south#1.lit_test
lincom 1.aussie_ballot + 1.south#1.aussie_ballot
lincom 1.exfelon + 1.south#1.exfelon

##Table 4##
xtreg turnout i.poll_tax##c.pctblack i.lit_test##c.pctblack i.women_vote##c.pctblack i.aussie_ballot##c.pctblack i.exfelon##c.pctblack c.lynchings##c.pctblack i.elec_type i.state i.year if year>1869 & year<1971, fe vce(cl state)

xtreg turnout i.poll_tax##c.pctblack i.lit_test##c.pctblack i.women_vote##c.pctblack i.aussie_ballot##c.pctblack i.exfelon##c.pctblack c.lynchings##c.pctblack i.elec_type i.state i.year if year>1869 & year<1971 & south==1, fe vce(cl state)

xtreg turnout i.poll_tax##c.pctblack i.lit_test##c.pctblack i.women_vote##c.pctblack i.aussie_ballot##c.pctblack i.exfelon##c.pctblack c.lynchings##c.pctblack i.elec_type i.state i.year if year>1869 & year<1971 & south==0, fe vce(cl state)

##Table 5##
quietly xtreg turnout i.poll_tax##c.pctblack i.lit_test##c.pctblack i.women_vote##c.pctblack i.aussie_ballot##c.pctblack i.exfelon##c.pctblack c.lynchings##c.pctblack i.elec_type i.state i.year if year>1869 & year<1971, fe vce(cl state)

margins, dydx(poll_tax) at(pctblack=(33.15 60.7))
margins, dydx(lit_test) at(pctblack=(0.06 2.7 33.15 60.7))
margins, dydx(aussie_ballot) at(pctblack=(0.06 2.7 33.15 60.7))
margins, dydx(exfelon) at(pctblack=(0.06 2.7 33.15 60.7))

##Table 6##
xtreg gopresult i.poll_tax##c.pctblack i.lit_test##c.pctblack i.women_vote##c.pctblack i.aussie_ballot##c.pctblack i.exfelon##c.pctblack c.lynchings##c.pctblack i.elec_type i.state i.year if year>1869 & year<1971, fe vce(cl state)

xtreg gopresult i.poll_tax##c.pctblack i.lit_test##c.pctblack i.women_vote##c.pctblack i.aussie_ballot##c.pctblack i.exfelon##c.pctblack c.lynchings##c.pctblack i.elec_type i.state i.year if year>1869 & year<1971 & south==1, fe vce(cl state)

xtreg gopresult i.poll_tax##c.pctblack i.lit_test##c.pctblack i.women_vote##c.pctblack i.aussie_ballot##c.pctblack i.exfelon##c.pctblack c.lynchings##c.pctblack i.elec_type i.state i.year if year>1869 & year<1971 & south==0, fe vce(cl state)

##Table 7##
xtreg gopresult i.poll_tax##c.pctblack i.lit_test##c.pctblack i.women_vote##c.pctblack i.aussie_ballot##c.pctblack i.exfelon##c.pctblack c.lynchings##c.pctblack i.elec_type i.state i.year if year>1869 & year<1971, fe vce(cl state)
margins, dydx(poll_tax) at(pctblack=(33.15 60.7))
margins, dydx(lit_test) at(pctblack=(0.06 2.7 33.15 60.7))
margins, dydx(aussie_ballot) at(pctblack=(0.06 2.7 33.15 60.7))
margins, dydx(exfelon) at(pctblack=(0.06 2.7 33.15 60.7))


##Load County-Level Data File##
##Table 8##
xtset statecounty

xtreg turnout i.poll_tax i.lit_test i.women_vote i.aussie_ballot i.exfelon i.year if year>1869 & year<1971, fe vce(cl statecounty)

xtreg turnout i.poll_tax##i.south i.lit_test##i.south i.women_vote##i.south i.aussie_ballot##i.south i.exfelon##i.south i.year if year>1869 & year<1971, fe vce(cl statecounty)

xtreg turnout i.poll_tax##c.blackper i.lit_test##c.blackper i.women_vote##c.blackper i.aussie_ballot##c.blackper i.exfelon##c.blackper i.year if year>1869 & year<1971, fe vce(cl statecounty)



##Appendix##
##Load State-Level Data File##

##Time Analysis##

xtset state

xtreg turnout poll_tax i.lit_test##i.south i.women_vote##i.south i.aussie_ballot##i.south i.exfelon##i.south c.lynchings##i.south i.elec_type i.year if year>1869 & year<1921, fe vce(cl state)

xtreg turnout poll_tax i.lit_test##i.south i.women_vote##i.south i.aussie_ballot##i.south i.exfelon##i.south c.lynchings##i.south i.elec_type i.year if year>1920 & year<1971, fe vce(cl state)

xtreg gopresult poll_tax i.lit_test##i.south i.women_vote##i.south i.aussie_ballot##i.south i.exfelon##i.south c.lynchings##i.south i.elec_type i.year if year>1869 & year<1921, fe vce(cl state)

xtreg gopresult poll_tax i.lit_test##i.south i.women_vote##i.south i.aussie_ballot##i.south i.exfelon##i.south c.lynchings##i.south i.elec_type i.year if year>1920 & year<1971, fe vce(cl state)








